<?php

namespace App\Http\Controllers\Api;

use Illuminate\Http\Request;
use App\Http\Requests\Api\CollectRequest;
use App\Transformers\CollectTransformer;
use App\Transformers\UserTransformer;
use App\Models\Collect;
class CollectsController extends Controller
{



    public function store(CollectRequest $request, Collect $collect)
    {
      $collect->fill($request->all());
      $collect->user_id = $this->user()->id;
      // return $request->pictuers_id;
      $collect->save();
      $collect->pictuers()->detach($request->pictuers_id);
      return $this->response->item($collect, new CollectTransformer);
    }
}
